<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">

  <title>Document</title>

  <style>
    #app {
      width: 500px;
      height: 500px;
      background-color:pink;
    }

    p {
      font-size: 40px;
    }
  </style>
</head>
<body>
  
  <div id="app">
    <p>{{text}}</p>
    <button @click="change">点击翻转</button>
  </div>
  <script src="../vue.js"></script>
  <script>
    const app = new Vue({
      el: '#app',
      data: {
        text:'Hello ,World'
      },
      methods: {
        change () {
          this.text = this.text.split('').reverse().join('')
        }
      }
    })

  </script>


</body>
</html>